package com.yxt.dispatch.controller;

import com.yxt.dispatch.feign.UserFeignApi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@Slf4j
@RestController
@RequestMapping("/dispatch")
public class TestFeignController {
    @Autowired
    UserFeignApi userFeignApi;

    @GetMapping("/callUserService")
    public String callUserService(){
        HashMap<String, Object> params = new HashMap<>();
        return userFeignApi.list(params);
    }

    @GetMapping("/hello")
    public String hello(){
        return "hello";
    }

    @GetMapping("/hello2")
    public String hello2(){
        return "hello2";
    }
}
